// function createArray<T>(length: number, value: T) {
//     const result = []
//     for (let i = 0; i < length; i++) {
//         result[i] = value
//     }
//     return result
// }
const createArray = <T>(length: number, value: T) => {
    const result = []
    for (let i = 0; i < length; i++) {
        result[i] = value
    }
    return result
}
console.log(createArray<string>(2, '1254'));
console.log(createArray<number>(6, 111));
